package com.agriculture.monitor.service.impl;

import com.agriculture.monitor.dto.BasePage;
import com.agriculture.monitor.entity.Position;
import com.agriculture.monitor.entity.Role;
import com.agriculture.monitor.mapper.RoleMapper;
import com.agriculture.monitor.service.IRoleService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author admin
 * @since 2024-03-21
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IRoleService {

    @Override
    public Page<Role> listPage(BasePage basePage) {
        Page<Role> page = new Page(basePage.getPageCurrent(), basePage.getPageSize());
        LambdaQueryWrapper<Role> queryWrapper = new LambdaQueryWrapper<>();

        baseMapper.selectPage(page, queryWrapper);
        return page;
    }
}
